| Total Complexity | 2 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import Twit from 'twit'; |
||
| 11 | |||
| 12 | export abstract class AbstractAction { |
||
| 13 | config: BotConfig; |
||
| 14 | twit: Twit; |
||
| 15 | debug: Debug.Debugger; |
||
| 16 | |||
| 17 | constructor(config: BotConfig, twit: Twit, debug: Debug.Debugger) { |
||
| 18 | this.config = config; |
||
| 19 | this.twit = twit; |
||
| 20 | this.debug = debug; |
||
| 21 | } |
||
| 22 | |||
| 23 | abstract run(args: runArgs): void; |
||
| 24 | |||
| 25 | protected isSuccessResponse(response: Twit.PromiseResponse): boolean { |
||
| 26 | return response.resp.statusCode === 200; |
||
| 27 | } |
||
| 28 | } |